package com.xquant.system.enums;


/**
 *三方对比相同属性字段定义枚举
 * */
public enum SetSameEnum {

    NAME("name","债券简称"),
    TRANSACTION_CODE("transactionCode","交易代码"),
    TRADING_MARKETS("tradingMarkets","交易市场"),
    DEFAULT_TYPE("defaultType","违约类型"),

    EVENT_DEFAULT("eventDefault","违约事件"),
    DEFAULT_AMOUNT_TOTAL("defaultAmountTotal","违约总金额"),
    DEFAULT_AMOUNT("defaultAmount","违约本金"),
    DEFAULT_INTEREST("defaultInterest","违约利息");


    private String value;

    private String description;

    SetSameEnum(String value, String description) {
        this.value = value;
        this.description = description;
    }

    /**
     * 根据编码获取类型
     * */
    public static SetSameEnum getByValue(String value){
        for(SetSameEnum type : SetSameEnum.values()){
            if(type.getValue().equals(value)){
                return type;
            }
        }
        return null;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
}
